import { createStore , combineReducers} from "redux";
import { collApsedReducer } from "./reducers/CollasedReducer";
import { LoadingReducer } from "./reducers/LoadingReducer";
import { persistStore, persistReducer } from 'redux-persist'
import storage from 'redux-persist/lib/storage' // defaults to localStorage for web
const persistConfig = {
    key: 'kerwin',
    storage,
    blacklist: ['LoadingReducer'] 
}
const reducer = combineReducers({
    collApsedReducer,
    LoadingReducer
})
const persistedReducer = persistReducer(persistConfig, reducer)

const store = createStore(persistedReducer);
export const persistor = persistStore(store)
export default store